package com.zz.bsea.basic;

public class User {
	/**身份证号码**/
	private int id;
	
	/**年龄**/
	private int age;
	
	/**姓名**/
	private String name;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	
	public boolean equals(Object obj) {
		
		if (this == obj) {
            return true;
        }
        if (obj instanceof User) {
        	User inputUser = (User)obj;
        	//只要身份证号码相同，我们就认为是同一个人，equals方法就返回true
        	if(this.id==inputUser.id) {
        		return true;
        	}else {
        		 return false;
        	}
            
        }
        return false;
	}
	
	
	
	public int hashCode() {
	
        return this.id*7;
    }
	
	
}
